/* This is a generated file. Don't edit. Edit the source instead.
 */

#ifndef _ui_cmd_h_
#define _ui_cmd_h_

#include <inttypes.h>
#include "sys_queue.h"
#include <sys/time.h>
#include <sys/types.h>
#include <event.h>

typedef struct ui ui_t;
struct ui
{
    LIST_ENTRY(ui) next;
    struct event send_state_event;
    int fd;
    struct bufferevent *bufev;

    int (*cb_rescan_share_interval)(ui_t *ui, unsigned int seconds);
    int (*cb_update_user_info)(ui_t *ui, const char *speed, const char *description, const char *email);
    int (*cb_set_port)(ui_t *ui, int port);
    int (*cb_search_all)(ui_t *ui, const char *search_string, uint64_t size, int size_restriction, int file_type, int id);
    int (*cb_transfer_stats_interval)(ui_t *ui, unsigned int seconds);
    int (*cb_add_shared_path)(ui_t *ui, const char *path);
    int (*cb_download_file)(ui_t *ui, const char *hub_address, const char *nick, const char *source_filename, uint64_t size, const char *target_filename, const char *tth);
    int (*cb_forget_search)(ui_t *ui, int search_id);
    int (*cb_public_message)(ui_t *ui, const char *hub_address, const char *message);
    int (*cb_raw_command)(ui_t *ui, const char *hub_address, const char *command);
    int (*cb_queue_remove_nick)(ui_t *ui, const char *nick);
    int (*cb_set_incomplete_directory)(ui_t *ui, const char *incomplete_directory);
    int (*cb_set_download_directory)(ui_t *ui, const char *download_directory);
    int (*cb_queue_remove_filelist)(ui_t *ui, const char *nick);
    int (*cb_set_hash_prio)(ui_t *ui, unsigned int prio);
    int (*cb_remove_shared_path)(ui_t *ui, const char *path);
    int (*cb_grant_slot)(ui_t *ui, const char *nick);
    int (*cb_download_filelist)(ui_t *ui, const char *hub_address, const char *nick, int force_update, int auto_match);
    int (*cb_set_slots)(ui_t *ui, unsigned int slots, unsigned int per_hub_flag);
    int (*cb_private_message)(ui_t *ui, const char *hub_address, const char *nick, const char *message);
    int (*cb_expect_shared_paths)(ui_t *ui, int num_shared_paths);
    int (*cb_set_passive)(ui_t *ui, int on);
    int (*cb_set_password)(ui_t *ui, const char *hub_address, const char *password);
    int (*cb_connect)(ui_t *ui, const char *hub_address, const char *nick, const char *email, const char *description, const char *speed, int passive, const char *password, const char *encoding);
    int (*cb_queue_remove_target)(ui_t *ui, const char *target_filename);
    int (*cb_disconnect)(ui_t *ui, const char *hub_address);
    int (*cb_set_auto_search)(ui_t *ui, int enabled);
    int (*cb_set_ip_address)(ui_t *ui, const char *ip_address);
    int (*cb_set_follow_redirects)(ui_t *ui, unsigned int flag);
    int (*cb_cancel_transfer)(ui_t *ui, const char *target_filename);
    int (*cb_set_priority)(ui_t *ui, const char *target_filename, unsigned int priority);
    int (*cb_queue_remove_directory)(ui_t *ui, const char *target_directory);
    int (*cb_search)(ui_t *ui, const char *hub_address, const char *search_string, uint64_t size, int size_restriction, int file_type, int id);
    int (*cb_queue_remove_source)(ui_t *ui, const char *target_filename, const char *nick);
    int (*cb_shutdown)(ui_t *ui);
    int (*cb_download_directory)(ui_t *ui, const char *hub_address, const char *nick, const char *source_directory, const char *target_directory);
    int (*cb_pause_hashing)(ui_t *ui);
    int (*cb_resume_hashing)(ui_t *ui);
    int (*cb_log_level)(ui_t *ui, const char *level);
};

ui_t *ui_init(void);

int ui_dispatch_command(const char *line, const char *delimiters,
        int allow_null_elements, ui_t *ui);
#endif
